<template>
	<label>{{label}}</label>
</template>

<script>
	export default {
		name: "LabelRenderer",
		props: ["componentModel","rowData"],
		data() {
			return {
				label: ""
			}
		},mounted() {
			var selectItemMap=this.rowData["selectItemMap"];
			var selectItemList=selectItemMap[this.componentModel.id];
			var value=this.rowData[this.componentModel.dataField];
			if(value!=null){
				if(selectItemList!=undefined){
					for(var i=0;i<selectItemList.length;i++){
						if(selectItemList[i].value==value){
							this.label=selectItemList[i].name;
							break;
						}
					}
				}else{
					this.label=value;
				}
			}
			
		},methods: {
			setProp() {
				
			}
		},
	}
</script>

<style>
</style>
